using System;
using System.Collections.Generic;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace WPFtextEffect
{
    /// <summary>
    /// Interaction logic for UserControl1.xaml
    /// </summary>

    public partial class UserControl1 : System.Windows.Controls.UserControl,
                                        Microsoft.VisualC.MFC.ICommandTarget
    {
    

        public UserControl1()
        {
            InitializeComponent();
            button1.Click +=new RoutedEventHandler(button1_Click);  
  
        }
        void button1_Click(object sender, RoutedEventArgs e)
        {
            OnClick(e);
        }
        
        public event RoutedEventHandler Click;
        protected virtual void OnClick(System.Windows.RoutedEventArgs e)
        {
            if (Click != null)
            {
                Click(this, e);
            }
        }
        public void Initialize(Microsoft.VisualC.MFC.ICommandSource src)
        {


            DPE.VisualC.MFC.EV.WPFCommandTarget wpfcommand =
                new DPE.VisualC.MFC.EV.WPFCommandTarget();
            wpfcommand.Initialize(src, this); 

            
        }

    }
}